package com.ihmp.business;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ihmp.dao.BlockDao;
import com.ihmp.model.Tblocks;
@Service
@Transactional
public class BlockServiceImpl implements BlockService{

	@Autowired
	private BlockDao blockDao;
	
	@Override
	public void saveOrUpdate(Tblocks block) {
		blockDao.saveOrUpdate(block);
		
	}

	@Override
	public Tblocks findById(Integer id) {
		return blockDao.findById(id);
	}

	@Override
	public void delete(Tblocks block) {
		blockDao.delete(block);
		
	}

	@Override
	public List<Tblocks> listBlocks() {
		return blockDao.listBlocks();
	}

	@Override
	public List<Tblocks> getBlocksFromHotelId(Integer id) {
		return blockDao.getBlocksFromHotelId(id);
	}

}
